package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_INFO_GLSORT"
 *     
*/
public class CcpInfoGlsort implements Serializable {

    /** identifier field */
    private String cigGuid;

    /** persistent field */
    private String glsCode;

    /** persistent field */
    private String name;

    /** nullable persistent field */
    private String parentCode;

    /** persistent field */
    private String leafFlag;

    /** nullable persistent field */
    private String strucCode;

    /** nullable persistent field */
    private String remark;

    /** full constructor */
    public CcpInfoGlsort(String cigGuid, String glsCode, String name, String parentCode, String leafFlag, String strucCode, String remark) {
        this.cigGuid = cigGuid;
        this.glsCode = glsCode;
        this.name = name;
        this.parentCode = parentCode;
        this.leafFlag = leafFlag;
        this.strucCode = strucCode;
        this.remark = remark;
    }

    /** default constructor */
    public CcpInfoGlsort() {
    }

    /** minimal constructor */
    public CcpInfoGlsort(String cigGuid, String glsCode, String name, String leafFlag) {
        this.cigGuid = cigGuid;
        this.glsCode = glsCode;
        this.name = name;
        this.leafFlag = leafFlag;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CIG_GUID"
     *         
     */
    public String getCigGuid() {
        return this.cigGuid;
    }

    public void setCigGuid(String cigGuid) {
        this.cigGuid = cigGuid;
    }

    /** 
     *            @hibernate.property
     *             column="GLS_CODE"
     *             length="15"
     *             not-null="true"
     *         
     */
    public String getGlsCode() {
        return this.glsCode;
    }

    public void setGlsCode(String glsCode) {
        this.glsCode = glsCode;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="PARENT_CODE"
     *             length="15"
     *         
     */
    public String getParentCode() {
        return this.parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    /** 
     *            @hibernate.property
     *             column="LEAF_FLAG"
     *             length="1"
     *             not-null="true"
     *         
     */
    public String getLeafFlag() {
        return this.leafFlag;
    }

    public void setLeafFlag(String leafFlag) {
        this.leafFlag = leafFlag;
    }

    /** 
     *            @hibernate.property
     *             column="STRUC_CODE"
     *             length="20"
     *         
     */
    public String getStrucCode() {
        return this.strucCode;
    }

    public void setStrucCode(String strucCode) {
        this.strucCode = strucCode;
    }

    /** 
     *            @hibernate.property
     *             column="REMARK"
     *             length="200"
     *         
     */
    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cigGuid", getCigGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpInfoGlsort) ) return false;
        CcpInfoGlsort castOther = (CcpInfoGlsort) other;
        return new EqualsBuilder()
            .append(this.getCigGuid(), castOther.getCigGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCigGuid())
            .toHashCode();
    }

}
